<template>
  <div style="float: right;">
    <el-input placeholder="请输入关键字" v-model="key" clearable style="width: 300px;"></el-input>
    <el-button slot="append" icon="el-icon-search" @click.prevent="search"></el-button>
  </div>
</template>
<script>
export default {
  data: function() {
    return {
      key:""
    };
  },
  methods:{
      search:function(){
          this.$emit("search", this.key.trim());
      }
  }
};
</script>

